package com.millstein.tsinglog.model.dto.comment;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
public class CommentSaveDTO {

    @NotBlank(message = "用户名不能为空")
    @Length(max = 10, message = "用户名最大长度不能超过10个字符")
    private String name;

    @NotBlank
    @Email(message = "邮箱格式有误")
    private String email;

    @NotBlank(message = "评论的内容不能为空")
    @Length(max = 500)
    private String content;

    @NotNull(message = "评论文章的id不能为空")
    private Long aid;

    private Integer preFloor;
}
